<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page contentType="text/html;charset=UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<!--[if IE 9 ]>
<html class="ie9">
<![endif]-->
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
        <meta name="format-detection" content="telephone=no">
        <meta charset="UTF-8">

        <meta name="description" content="Violate Responsive Admin Template">
        <meta name="keywords" content="Super Admin, Admin, Template, Bootstrap">

        <title>音乐上传</title>
            
        <!-- CSS -->
        <link href="${pageContext.request.contextPath}/admin/css/bootstrap.min.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath}/admin/css/animate.min.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath}/admin/css/font-awesome.min.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath}/admin/css/form.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath}/admin/css/calendar.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath}/admin/css/file-manager.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath}/admin/css/style.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath}/admin/css/icons.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath}/admin/css/generics.css" rel="stylesheet"> 
    </head>
    
    <body id="skin-blur-violate">
        <header id="header" class="media">
            <a href="" id="menu-toggle"></a> 
            <a class="logo pull-left" href="index.html">资源管理</a>
            
            <div class="media-body">
                <div class="media" id="top-menu">
                    
                    
                    

                    <div id="time" class="pull-right">
                        <span id="hours"></span>
                        :
                        <span id="min"></span>
                        :
                        <span id="sec"></span>
                    </div>

                    <div class="media-body">
                        <input type="text" class="main-search">
                    </div>
                </div>
            </div>
        </header>
        
        <div class="clearfix"></div>
        
        <section class="p-relative" role="main">
            
            <!-- Sidebar -->
            <aside id="sidebar">
                
                <!-- Sidbar Widgets -->
                <div class="side-widgets overflow">
                    <!-- Profile Menu -->
                    <div class="text-center s-widget m-b-25 dropdown" id="profile-menu">
                         <a href="" data-toggle="dropdown">
                            <img class="profile-pic animated" src="${pageContext.request.contextPath}/admin/img/1.jpg" alt="">
                        </a>
                         <ul class="dropdown-menu profile-menu">
                             <li><a href="${pageContext.request.contextPath}/music/listadmin">转到音乐播放界面</a> <i class="icon left">&#61903;</i><i class="icon right">&#61815;</i></li>
                            <li><a href="${pageContext.request.contextPath}/video/listadmin">转到视频播放界面</a> <i class="icon left">&#61903;</i><i class="icon right">&#61815;</i></li>     
                            <li><a href="${pageContext.request.contextPath}/system/user/login">退出登陆</a> <i class="icon left">&#61903;</i><i class="icon right">&#61815;</i></li>
                        </ul>
                        <h4 class="m-0">管理员</h4>
                    </div>
                    
                    <!-- Calendar -->
                    <div class="s-widget m-b-25">
                        <div id="sidebar-calendar"></div>
                    </div>
                    
                    <!-- Calendar -->
                    <div class="s-widget m-b-25">
                        <div id="sidebar-calendar"></div>
                    </div>
                    
                    
                </div>
                
                <!-- Side Menu -->
                <ul class="list-unstyled side-menu">
                    <li>
                        <a class="sa-side-home" href="index.jsp">
                            <span class="menu-item">主页</span>
                        </a>
                    </li>
                    <li>
                        <a class="sa-side-typography" href="${pageContext.request.contextPath}/music/list">
                            <span class="menu-item">音乐管理</span>
                        </a>
                    </li>
                    <li>
                        <a class="sa-side-widget" href="${pageContext.request.contextPath}/video/list">
                            <span class="menu-item">视频管理</span>
                        </a>
                    </li>
                    <li>
                        <a class="sa-side-table" href="${pageContext.request.contextPath}/user/list">
                            <span class="menu-item">用户管理</span>
                        </a>
                    </li>
                    <li class="active">
                        <a class="sa-side-folder" href="${pageContext.request.contextPath}/music/add">
                            <span class="menu-item">上传音乐</span>
                        </a>
                    </li>
                    <li>
                        <a class="sa-side-calendar" href="${pageContext.request.contextPath}/video/add">
                            <span class="menu-item">上传视频</span>
                        </a>
                    </li>
                </ul>
                
            </aside>
        
            <!-- Content -->
            <section id="content" class="container">
            
               <!--上传  -->
              <%--   <form action="${pageContext.request.contextPath}/music/addnews" method="post" enctype="multipart/form-data"> --%>
                
                <div class="block-area" id="basic">
                    <h3 class="block-title">上传</h3>
                     <div class="tile p-15">
                    <form action="${pageContext.request.contextPath}/music/addnews" method="post" enctype="multipart/form-data">
                        <div class="form-group">
                            <label for="exampleInputEmail1">音乐名</label>
                            <input type="text" class="form-control input-sm" name="musicName" id="exampleInputEmail1" placeholder="Music Name">
                        </div>
                        
                        <div class="form-group">
                             <label for="exampleInputPassword1">歌手名</label>
                            <input type="text" class="form-control input-sm" name="singer" id="exampleInputPassword1" placeholder="Singer Name">
                        </div>
                        
                        <p>把你需要上传的音乐放这...</p>
                        <div class="fileupload fileupload-new" data-provides="fileupload">
                            <span class="btn btn-file btn-sm btn-alt">
                                <span class="fileupload-new">选择音乐</span>
                                <span class="fileupload-exists">重选</span>
                                <input type="file" name="file" id="file" accept="audio/mp3"  /><!-- onchange="fileChange(this);" -->
                            </span>
                            <span class="fileupload-preview"></span>
                            <a href="#" class="close close-pic fileupload-exists" data-dismiss="fileupload">
                                <i class="fa fa-times"></i>
                            </a>  
                        </div>
                        
                        <button type="submit" class="btn btn-sm m-t-10">提交</button>
                        
					<span class="btn btn-block btn-alt">	
					${requestScope.message}
					</span>
					
                    </form>
                </div>
                </div>
                
            </section>
        </section>
        
        <!-- Javascript Libraries -->
        <!-- jQuery -->
        <script src="${pageContext.request.contextPath}/admin/js/jquery.min.js"></script> <!-- jQuery Library -->
        <script src="${pageContext.request.contextPath}/admin/js/jquery-ui.min.js"></script> <!-- jQuery UI -->
        
        <!-- Bootstrap -->
        <script src="${pageContext.request.contextPath}/admin/js/bootstrap.min.js"></script>
          
        
        <!-- UX -->
        <script src="${pageContext.request.contextPath}/admin/js/scroll.min.js"></script> <!-- Custom Scrollbar -->
        
        <!-- Other -->
        <script src="${pageContext.request.contextPath}/admin/js/calendar.min.js"></script> <!-- Calendar -->
        <script src="${pageContext.request.contextPath}/admin/js/feeds.min.js"></script> <!-- News Feeds -->
        <script src="${pageContext.request.contextPath}/admin/js/file-manager/elfinder.min.js"></script> <!-- File Manager -->
        
        
        <!-- All JS functions -->
        <script src="${pageContext.request.contextPath}/admin/js/functions.js"></script>

         <!--  Form Related -->
        <script src="${pageContext.request.contextPath}/admin/js/select.min.js"></script> <!-- Custom Select -->
        <script src="${pageContext.request.contextPath}/admin/js/icheck.js"></script> <!-- Custom Checkbox + Radio -->
        <script src="${pageContext.request.contextPath}/admin/js/fileupload.min.js"></script> <!-- File Upload -->
        <script src="${pageContext.request.contextPath}/admin/js/autosize.min.js"></script> <!-- Textare autosize -->
        
       <!--  <script type="text/javascript">
        function fileChange(target) {
			var isIE = /msie/i.test(navigator.userAgent) && !window.opera;
			var fileSize = 0;
			if(isIE && !target.files) {
				var filePath = target.value;
				var fileSystem = new ActiveXObject("Scripting.FileSystemObject");
				var file = fileSystem.GetFile(filePath);
				fileSize = file.Size;
			} else {
				fileSize = target.files[0].size;
			}
			var name = target.value;
			var fileName = name.substring(name.lastIndexOf(".") + 1).toLowerCase();
			if(fileName != "mp3") {
				alert("请选择mp3格式文件上传！");
				target.value = "";
				return
			}
		}
        </script> -->
        
    </body>
</html>

